package com.easy;

import com.easy.web.repository.BalanceRepository;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Import;

/**
 * @Packge com.easy
 * @Autor linNaibin
 * @Description
 * @Version 1.0
 * @Date 2021/1/12 17:33
 */
//@Import(SwaggerConfiguration.class)
@SpringBootApplication
public class AdminApplication {

    private static final Logger logger = LoggerFactory.getLogger(AdminApplication.class);

    public static void main(String[] args) {
        System.out.println("Hello World!");

        ConfigurableApplicationContext conn = null;
        try {
            conn = SpringApplication.run(AdminApplication.class, args);
            // test db
            BalanceRepository repository = conn.getBean(BalanceRepository.class);
            repository.findAll().stream().forEach(e -> System.out.println("balance :" + e.getId()));
            //
        } catch (Exception e) {
            e.printStackTrace();
        }

        System.out.println("启动完毕...");
    }

}